home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / Batch.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  777 b   |  53 lines

  1. ' Open Data File
  2.     File$ = "*\bdata.txt"
  3.     open "i", 1, File$
  4. ' Input Path
  5.     Input #1, b$
  6. ' Output path
  7.     Input #1, e$
  8.     f$ = e$,"\"
  9.     Sys$(20) = f$
  10. ' Close File
  11.     Close #1
  12. ' Open File
  13.     File$ = "*\bfiles.txt"
  14.     open "i", 1, File$
  15.     open "i", 2, "*\bfiles2.txt"
  16. ' Loop Until End of File
  17. Do While EOF(1) = 0
  18.     Input #1, A$
  19.     Input #2, c$
  20. ' Opens the file, Fits it to Window
  21.     >Open
  22.     {
  23.     <Filename [A$]
  24.     }
  25. ' Fit file to window
  26.     >FitToAllWindow
  27.     {
  28.     }
  29.     sblen = Len(c$)
  30.     sblen = sblen - 3
  31.     d$ = Left$(c$, sblen)
  32.     s$ = "dc"
  33.     g$ = d$,s$
  34.     Temp$ = e$ + "\" + g$
  35. ' Save File
  36.     >SaveAs
  37.     {
  38.     <SelectOnly 0
  39.     <Filename [Temp$]
  40.     }
  41. ' Close Current File
  42.     >Close
  43.     {
  44.     <SaveChanges 1
  45.     <FileName [Temp$]
  46.     }
  47. Loop
  48. ' Close Data Files
  49.     Close #1
  50.     Close #2
  51. ' Done
  52. End
  53.